package com.ly.mpayment.persist.service.upshoppro;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

import com.ly.mpayment.persist.entity.ProductPriceUp;
import com.ly.mpayment.persist.entity.UpShopProduct;
import com.ly.mpayment.persist.entity.User;
import com.ly.mpayment.persist.hibernate.Page;
import net.sf.json.JSONObject;

public interface IUpShopProService {


	public boolean addUpshoppro(UpShopProduct shop,User userAdmin);

	public boolean updateUpshoppro(UpShopProduct shop,User userAdmin,boolean enable);

	public UpShopProduct findById(String id);

	public Page<UpShopProduct> findPageUpshoppro(Map<String, Object> parameters,int start,int pageSize);

	public List<UpShopProduct> findListProduct(String uuids);

	/**
	 * 按最低价格查询产品
	 * @param operators
	 * @param province
	 * @param busCode
	 * @param rechargeamount
	 * @return
	 */
	public List<UpShopProduct> findOrderMatch(String operators, String province, String busCode, BigDecimal rechargeamount,String facevalue,String cityName);

	public List<UpShopProduct> findOrderMatchRepeat(String operators, String province, String busCode, BigDecimal rechargeamount,
													String facevalue,String cityName,List<String> lastProduct);


	/**
	 * 下游手动匹配产品查询
	 * @param parameters
	 * @param int1
	 * @param int2
	 * @return
	 */
	public Page<UpShopProduct> downProductMatchFind(Map<String, Object> parameters, int start, int pageSize);

	public UpShopProduct findProductExits(String provinceuuid, String operatoruid,String busuuid,String useruuid,String upfacevalue,BigDecimal price,String productCode);

	public List<UpShopProduct> findBatchUpProduct(String provinceuuid, String operatoruid,String busuuid,String useruuid,String cityName);

	public List<UpShopProduct> getProductList(String useruuid);

	public List<UpShopProduct> exportUpProduct(Map<String, Object> parameters);

    String updateArtificial(JSONObject json);

	String updatePressOrder(JSONObject json);

	List<UpShopProduct> findNewProduct(String useruuid, String operators, String provinceuuid, String upfacevalue, String cityName,String bussuuid);

	List<UpShopProduct> findOrderMatchIn(String operators, String province, String busCode, BigDecimal discountAmount, String downfacevalue, String cityName, List<String> lastUp);

	List<UpShopProduct> findOrderMatchManual(String operators, String province, String busCode, BigDecimal discountAmount, String downfacevalue, String cityName, String useruuid);

    UpShopProduct findByUpShopProduct(String upuuid, String provinceuuid, String operatoruid, String busuuid, String downfacevalue,String cityName);

	UpShopProduct findProductAndFaceValue(String upprouuid, String downfacevalue);

	String findPageProductDown(JSONObject json, int start, int pageSize);

	String deleteDownProduct(String data);
//	public UpShopProduct findByUuidProduct(String string);

	void updateProductPriceUp(ProductPriceUp price);
}
